//
//  TitleCell.m
//  Miss
//
//  Created by 军哥 on 15-1-28.
//  Copyright (c) 2015年 Alan. All rights reserved.
//

#import "TitleCell.h"

@interface TitleCell()
- (void)setTitleCell;
@end

@implementation TitleCell
- (void)dealloc
{
    [_timeLabel release];
    [_zuoZhelabel release];
    [_titleLabel release];
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self setTitleCell];
    }
    return self;
}

- (void)setTitleCell
{
    //文章标题label
    self.titleLabel = [[UILabel alloc]init];
    [self.contentView addSubview:_titleLabel];
    self.titleLabel.font = [UIFont systemFontOfSize:30];
    self.titleLabel.font = [UIFont boldSystemFontOfSize:30];
    //字体颜色
    //        self.titleLabel.textColor = [UIColor colorWithRed:<#(CGFloat)#> green:<#(CGFloat)#> blue:<#(CGFloat)#> alpha:<#(CGFloat)#>]
    [_titleLabel release];
    
    //文章作者label
    self.zuoZhelabel = [[UILabel alloc]
                        init];
    [self.contentView addSubview:_zuoZhelabel];
    [_zuoZhelabel release];
    
    //阅读时间
    self.timeLabel =[[UILabel alloc]init];
    [self.contentView addSubview:_timeLabel];
    [_timeLabel release];
    
    //颜色
    self.titleLabel.backgroundColor = [UIColor greenColor];
    self.zuoZhelabel.backgroundColor = [UIColor cyanColor];
    self.timeLabel.backgroundColor = [UIColor greenColor];
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    self.titleLabel.frame = CGRectMake(10, 10, self.contentView.frame.size.width, 50);
    self.zuoZhelabel.frame = CGRectMake(10, 60, 200, 40);
    self.timeLabel.frame = CGRectMake(210, 60, 150, 40);
    
    
    
}



- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
